# gnumake

CC	= dmc
LIBR	= lib
CFLAGS	= -Jm -I. \
	-DWIN32=1 -D_WIN32=1 -D_STDCALL_SUPPORTED=1 \
	-D_stati64="_stat" \
	-DEV_STANDALONE=1 -DEV_IDLE_ENABLE=1 -DEV_ASYNC_ENABLE=1 -DEV_EMBED_ENABLE=1  -DEV_HAVE_EV_TIME=1 \
	-DEV_STAT_ENABLE=1 -DEV_SIGNAL_ENABLE=1 -DEV_USE_SELECT=1 \
	-DEV_PERIODIC_ENABLE=1 -DEV_CLEANUP_ENABLE=1 -DEV_MULTIPLICITY=1 \
	-DEV_PREPARE_ENABLE=1 -DEV_CHECK_ENABLE=1 -DEV_WALK_ENABLE=1 \
	-DEV_CHILD_ENABLE=0  -DEV_USE_IOCP=0 

all: ev.obj

%.obj: %.c
	$(CC) $(CFLAGS) $^ -c -o$@

libev.lib: $(EV_OBJS)
	$(LIBR) -c $@ $^
	
test.obj: test.c
	$(CC) $(CFLAGS) $^ -c -o$@

test: test.obj
	link $^,2test.exe,,advapi32+ws2_32+user32+shell32+kernel32/noi/delexe;

clean:
	del /Q /S *.map *.obj *.lib *.bak
